Optimal. Leaf size=96 \[ -\frac {1}{2} \log (1-x) (d+e+f+g+h+i)+\frac {1}{3} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac {1}{6} \log (x+1) (d-e+f-g+h-i)+x (g+2 h+5 i)+\frac {1}{2} x^2 (h+2 i)+\frac {i x^3}{3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {1586, 2074} \[ -\frac {1}{2} \log (1-x) (d+e+f+g+h+i)+\frac {1}{3} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac {1}{6} \log (x+1) (d-e+f-g+h-i)+x (g+2 h+5 i)+\frac {1}{2} x^2 (h+2 i)+\frac {i x^3}{3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 2074
Rubi steps
\begin {align*} \int \frac {(2+x) \left (d+e x+f x^2+g x^3+h x^4+84 x^5\right )}{4-5 x^2+x^4} \, dx &=\int \frac {d+e x+f x^2+g x^3+h x^4+84 x^5}{2-x-2 x^2+x^3} \, dx\\ &=\int \left (420 \left (1+\frac {1}{420} (g+2 h)\right )+\frac {2688+d+2 e+4 f+8 g+16 h}{3 (-2+x)}+\frac {-84-d-e-f-g-h}{2 (-1+x)}+(168+h) x+84 x^2+\frac {-84+d-e+f-g+h}{6 (1+x)}\right ) \, dx\\ &=(420+g+2 h) x+\frac {1}{2} (168+h) x^2+28 x^3-\frac {1}{2} (84+d+e+f+g+h) \log (1-x)+\frac {1}{3} (2688+d+2 e+4 f+8 g+16 h) \log (2-x)-\frac {1}{6} (84-d+e-f+g-h) \log (1+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 91, normalized size = 0.95 \[ \frac {1}{6} \left (-3 \log (1-x) (d+e+f+g+h+i)+2 \log (2-x) (d+2 e+4 (f+2 g+4 h+8 i))+\log (x+1) (d-e+f-g+h-i)+6 x (g+2 h+5 i)+3 x^2 (h+2 i)+2 i x^3\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.30, size = 82, normalized size = 0.85 \[ \frac {1}{3} \, i x^{3} + \frac {1}{2} \, {\left (h + 2 \, i\right )} x^{2} + {\left (g + 2 \, h + 5 \, i\right )} x + \frac {1}{6} \, {\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 90, normalized size = 0.94 \[ \frac {1}{3} \, i x^{3} + \frac {1}{2} \, h x^{2} + i x^{2} + g x + 2 \, h x + 5 \, i x + \frac {1}{6} \, {\left (d + f - g + h - i - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, {\left (d + f + g + h + i + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, {\left (d + 4 \, f + 8 \, g + 16 \, h + 32 \, i + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 156, normalized size = 1.62 \[ \frac {i \,x^{3}}{3}+\frac {h \,x^{2}}{2}+i \,x^{2}+\frac {d \ln \left (x -2\right )}{3}-\frac {d \ln \left (x -1\right )}{2}+\frac {d \ln \left (x +1\right )}{6}+\frac {2 e \ln \left (x -2\right )}{3}-\frac {e \ln \left (x -1\right )}{2}-\frac {e \ln \left (x +1\right )}{6}+\frac {4 f \ln \left (x -2\right )}{3}-\frac {f \ln \left (x -1\right )}{2}+\frac {f \ln \left (x +1\right )}{6}+g x +\frac {8 g \ln \left (x -2\right )}{3}-\frac {g \ln \left (x -1\right )}{2}-\frac {g \ln \left (x +1\right )}{6}+2 h x +\frac {16 h \ln \left (x -2\right )}{3}-\frac {h \ln \left (x -1\right )}{2}+\frac {h \ln \left (x +1\right )}{6}+5 i x +\frac {32 i \ln \left (x -2\right )}{3}-\frac {i \ln \left (x -1\right )}{2}-\frac {i \ln \left (x +1\right )}{6} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 82, normalized size = 0.85 \[ \frac {1}{3} \, i x^{3} + \frac {1}{2} \, {\left (h + 2 \, i\right )} x^{2} + {\left (g + 2 \, h + 5 \, i\right )} x + \frac {1}{6} \, {\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.88, size = 99, normalized size = 1.03 \[ x\,\left (g+2\,h+5\,i\right )+\frac {i\,x^3}{3}-\ln \left (x-1\right )\,\left (\frac {d}{2}+\frac {e}{2}+\frac {f}{2}+\frac {g}{2}+\frac {h}{2}+\frac {i}{2}\right )+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}-\frac {i}{6}\right )+\ln \left (x-2\right )\,\left (\frac {d}{3}+\frac {2\,e}{3}+\frac {4\,f}{3}+\frac {8\,g}{3}+\frac {16\,h}{3}+\frac {32\,i}{3}\right )+x^2\,\left (\frac {h}{2}+i\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________